import 'package:share_fit/app/helper/ext/tr_ext.dart';
import 'package:share_fit/app/tools/log_utils.dart';
import 'package:share_fit/generated/locales.g.dart';

class ExerciseType {
  Type type;
  String? image;

  ExerciseType(this.type, this.image);

  get getTypeName => type.internalI18nName(type);

  get getRealImg => type.realImg(type);
}

enum Type {
  all('all', -1, 'all'),
  other('other', -10, 'other'), //

  /// 跑步类
  outdoorRunning('runningSports', 1, '户外跑步'),
  trailRunning('runningSports', 36, '越野跑'),
  indoorRunning(
      'runningSports', 166, '室内跑步(APP上是跑步机) 所有项目（325）不用这个枚举，请使用下面的 All projects (325) do not use this enumeration, please use the following'),
  enduranceRun('runningSports', 129, '耐力跑Endurance running'), //耐力跑Endurance running
  fatBurnRun('runningSports', 130, '燃脂跑Fat burned running'), //燃脂跑Fat burned running

  /// 骑行类
  rideBike('ridingSports', 2, '户外骑行'),
  indoorCycling('ridingSports', 134, '室内单车'),

  /// 室内运动
  spinning('indoorSports', 0x12, '动感单车Spinning'), //
  ellipticalTrainer('indoorSports', 31, '椭圆机'),
  indoorWalk('indoorSports', 26, '室内走路'),
  treadmill('indoorSports', 21, '室内跑步 (跑步机改为室内跑步)'),
  rowingMachine('indoorSports', 41, '划船机'),
  traditionStrengthTraining('indoorSports', 187, '传统肌力训练'),
  freeTraining('indoorSports', 25, '自由训练'),
  generalExercise('indoorSports', 167, '一般锻炼'),
  strengthTraining('indoorSports', 28, '肌力训练'),
  gymnastics('indoorSports', 22, '体操'),
  coreTraining('indoorSports', 80, '核心训练'),
  yoga('indoorSports', 19, '瑜伽'),
  yogaCatStyle('indoorSports', 168, '瑜伽猫式'),
  yogaCowStyle('indoorSports', 169, '瑜伽牛式'),
  yogaCobraPose('indoorSports', 170, '瑜伽眼镜蛇式'),
  yogaHero1('indoorSports', 171, '瑜伽英雄式1'),
  yogaHero2('indoorSports', 172, '瑜伽英雄式2'),
  yogaHero3('indoorSports', 173, '瑜伽英雄式3'),
  ladderTraining('indoorSports', 188, '阶梯训练'),
  mixedAerobic('indoorSports', 186, '混合有氧'),
  yogaRoller('indoorSports', 174, '瑜伽滚轮'),
  stepTraining('', 29, '踏步机'),
  airWalker('', 42, '漫步机'),

  /// 格斗运动
  fencing('wrestleSports', 89, '击剑'),
  boxingAerobics('wrestleSports', 176, '拳击有氧'),
  boxing('wrestleSports', 34, '拳击'),
  kickboxing('wrestleSports', 58, '自由搏击'),
  taekwondo('wrestleSports', 39, '跆拳道'),
  karate('wrestleSports', 46, '空手道'),
  taiChi('wrestleSports', 32, '太极拳'),
  wrestling('wrestleSports', 88, '角力'),
  martialArts('wrestleSports', 61, '武术'),
  judo('wrestleSports', 0X63, '柔道'),
  kendo('wrestleSports', 85, '剑道'),
  mixedMartialArts('wrestleSports', 154, '综合格斗'),

  /// 体育舞蹈类
  generalDance('sportsDance', 189, '一般舞蹈'),
  bellyDance('sportsDance', 120, '肚皮舞'),
  jazz('sportsDance', 135, '爵士舞'),
  latinDance('sportsDance', 56, '拉丁舞'),
  ballet('sportsDance', 59, '芭蕾'),
  streetDance('sportsDance', 57, '街舞'),
  squareDance('sportsDance', 149, '广场舞'),
  zumbaDance('sportsDance', 190, '尊巴'),
  socialDance('sportsDance', 157, '社交舞'),
  tapDancing('sportsDance', 158, '踢踏舞'),
  folkDance('sportsDance', 0X4C, '民族舞'),
  dance('sportsDance', 17, '舞蹈'),
  weightlifting('sportsDance', 155, '举重'),
  trackAndField('sportsDance', 156, '田径'),
  triathlon('sportsDance', 151, '铁人三项'),

  /// 专项运动
  archery('specialSports', 53, '射箭'),
  fishing('specialSports', 72, '钓鱼'),
  hunting('specialSports', 67, '打猎'),
  skateboarding('specialSports', 101, '滑板'),
  horseRiding('specialSports', 30, '骑马'),
  blading('specialSports', 0X67, '旱冰'),
  sailboat('specialSports', 147, '帆船'),

  /// 球类运动
  generalBallGames('ballGame', 194, '一般球类运动'),
  basketball('ballGame', 10, '篮球'),
  badminton('ballGame', 5, '羽毛球'),
  tableTennis('ballGame', 6, '乒乓球'),
  tennis('ballGame', 7, '网球'),
  billiards('ballGame', 122, '撞球'),
  bowling('ballGame', 64, '保龄球'),
  volleyball('ballGame', 13, '排球'),
  shuttlecock('ballGame', 33, '毽子球'),
  handball('ballGame', 63, '手球'),
  baseball('ballGame', 12, '棒球'),
  softball('ballGame', 90, '垒球'),
  cricket('ballGame', 14, '板球'),
  rugby('ballGame', 15, '美式橄榄球'),
  beachFootball('ballGame', 118, '沙滩足球'),
  beachVolleyball('ballGame', 119, '沙滩排球'),
  hockey('ballGame', 16, '曲棍球'),
  racquetball('ballGame', 65, '英式壁球'),
  jetFootball('ballGame', 136, '藤球'),
  dodgeBall('ballGame', 126, '躲避球'),
  football('ballGame', 11, '足球'),
  golfBall('ballGame', 195, '高尔夫球'),
  polo('ballGame', 161, '马球'),
  americanSquash('ballGame', 196, '美式壁球'),
  englishRugby('ballGame', 197, '英式橄榄球'),
  gateBall('ballGame', 132, '门球'),
  pickleBall('ballGame', 96, '匹克球'),
  pocketStickBall('ballGame', 162, '袋棍球'),

  /// 水上运动
  generalWaterActivities('waterActivity', 198, '一般水上活动'),
  surfing('waterActivity', 106, '冲浪'),
  boating('waterActivity', 23, '泛舟'),
  dragonBoat('waterActivity', 127, '划龙舟'),
  canoe('waterActivity', 199, '轻艇'),
  racingBoat('waterActivity', 145, '赛艇'),
  jetSki('waterActivity', 200, '水上摩托车'),
  paddleBoardSurfing('waterActivity', 143, '立桨冲浪'),
  groundWater('waterActivity', 201, '潜水'),
  diving('waterActivity', 105, '跳水'),
  paraGliderSurfing('waterActivity', 202, '滑翔伞冲浪'),
  surfingAndWaterSkiing('waterActivity', 203, '冲浪滑水'),
  waterBalloon('waterActivity', 160, '水球'),
  windsurfing('waterActivity', 204, '风帆冲浪'),
  drifting('waterActivity', 128, '漂流活动'),
  underwaterFitness('waterActivity', 205, '水中健身'),
  waterSports('waterActivity', 206, '水上运动'),
  freestyleSwimming('waterActivity', 207, '游泳_自由式'),
  breastStroke('waterActivity', 208, '游泳_蛙式'),
  backstroke('waterActivity', 209, '游泳_仰式'),
  butterflyStroke('waterActivity', 210, '游泳_蝶式'),
  openWaterSwimming('waterActivity', 141, '开放式水域游泳'),
  swimming('waterActivity', 4, '泳池游泳'),

  /// 冰上运动
  generalIceSports('winterSports', 211, '一般冰上运动'),
  skating('winterSports', 81, '溜冰'),
  iceHockey('winterSports', 38, '冰球'),
  curling('winterSports', 66, '冰壶'),
  snowSar('winterSports', 148, '雪上摩托车'),
  sled('winterSports', 212, '雪橇'),
  biathlon('winterSports', 121, '冬季两项'),
  crossCountrySkiing('winterSports', 124, '越野滑雪'),
  skiing('winterSports', 37, '滑雪'),
  snowboarding('winterSports', 68, '单板滑雪'),
  snowshoeHiking('winterSports', 213, '雪鞋健行'),
  snowSports('winterSports', 78, '雪地运动'),

  /// 其他运动类型
  jumpRope('other', 3, '跳绳'),
  hiit('other', 97, 'HIIT'),
  fitnessGaming('other', 82, '健身'),
  groupTraining('other', 84, '团体操'),
  pilates('other', 49, '皮拉提斯'),
  mixedFitness('other', 175, '混合健身'),
  functionalTraining('other', 51, '功能性训练'),
  physicalTraining('other', 52, '体能训练'),
  climbing('other', 8, '登山'),
  rockClimbing('other', 111, '攀岩'),
  bungeeJumping('other', 113, '蹦极活动'),
  parkour('other', 104, '跑酷'),
  bmxBike('other', 123, 'BMX'),
  orienteering('other', 142, '定向越野'),
  parachute('other', 144, '跳伞'),
  racingCar('other', 146, '赛车'),
  takeElevator('other', 215, '乘电梯'),
  takeEscalator('other', 216, '乘手扶梯'),
  gardening('other', 217, '做园艺'),
  doingHousehold('other', 218, '做家务'),
  inTheCar('other', 219, '在车里'),
  meditation('other', 220, '冥想'),
  static('other', 221, '静止'),
  tilt('other', 222, '倾斜'),
  wheelchairMobility('other', 223, '轮椅移动'),
  generalExtremeSports('other', 214, '一般极限运动'),
  battleGame('other', 165, '对战游戏'),
  flyAKite('other', 131, '放风筝'),
  tugOfWar('other', 125, '拔河'),
  swing('other', 150, '秋千'),
  stairs('other', 62, '爬楼'),
  obstacle('other', 140, '障碍赛'),
  scooter('other', 163, '滑板车'),
  paraGlider('other', 164, '滑翔伞'),
  teamSport('other', 192, '团队竞技'),
  fitnessVideoGames('other', 193, '健身电玩'),
  hiking('other', 179, '健行'),
  equestrianSports('other', 159, '马术运动'),
  play('other', 69, '玩乐'),
  generalLeisureSports('other', 191, '一般休闲运动'),
  rollerSkating('other', 93, '滑轮溜冰'),
  hulaHoop('other', 94, '呼啦圈'),
  discSports('other', 73, '飞盘'),
  darts('other', 95, '飞镖'),
  singleBar('other', 91, '单杠'),
  parallelBars('other', 92, '双杠'),
  cyclicTraining('other', 177, '循环训练'),
  aerobicTraining('other', 178, '有氧运动'),
  callisthenics('other', 83, '健美操'),
  p90x('other', 180, 'P90X'),
  kettleBellTraining('other', 153, '壶铃训练'),
  stairClimbingMachine('other', 181, '爬楼梯机'),
  barre('other', 182, 'Barre'),
  handWheel('other', 183, '手轮'),
  mindBodyExercise('other', 184, '身心运动'),
  softnessExercises('other', 185, '柔软操'),
  crossTraining('other', 48, '交叉训练'),

  /// 走路类
  outdoorWalk('walk', 35, '户外走路'),
  walking('walk', 9, '徒步Hiking'); //徒步Hiking

  const Type(this.classify, this.code, this.name);

  final String classify;
  final int code;
  final String name;

  static String getClassifyImg(Type type) {
    switch (type) {
      case outdoorRunning:
        return 'assets/images/home/exercise_type_outdoor_running.png';
      case indoorRunning:
        return 'assets/images/home/exercise_type_running.png';
      case indoorWalk:
      case outdoorWalk:
      case airWalker:
      case walking:
        return 'assets/images/home/exercise_type_walk.png';
      case rideBike:
      case indoorCycling:
        return 'assets/images/home/exercise_type_riding.png';
      case yogaCatStyle:
      case yogaCowStyle:
      case yogaCobraPose:
      case yogaHero1:
      case yogaHero2:
      case yogaHero3:
      case barre:
      case squareDance:
      case zumbaDance:
      case streetDance:
      case generalDance:
      case latinDance:
      case folkDance:
      case bellyDance:
      case jazz:
      case socialDance:
      case tapDancing:
      case dance:
      case weightlifting:
      case trackAndField:
      case triathlon:
        return 'assets/images/sports/sport_dance.png';
      case fencing:
      case boxing:
      case taiChi:
      case karate:
      case judo:
      case wrestling:
      case taekwondo:
      case martialArts:
      case kickboxing:
      case boxingAerobics:
      case kendo:
      case mixedMartialArts:
        return 'assets/images/sports/wrestle.png';
      case generalBallGames:
      case basketball:
      case badminton:
      case tennis:
      case billiards:
      case shuttlecock:
      case softball:
      case rugby:
      case beachFootball:
      case baseball:
      case cricket:
      case beachVolleyball:
      case racquetball:
      case volleyball:
      case hockey:
      case bowling:
      case tableTennis:
      case handball:
      case football:
      case americanSquash:
      case englishRugby:
      case jetFootball:
      case gateBall:
      case dodgeBall:
      case pickleBall:
      case golfBall:
      case polo:
      case pocketStickBall:
        return 'assets/images/sports/ball_game.png';

      // 水上运动
      case generalWaterActivities:
      case surfing:
      case boating:
      case dragonBoat:
      case canoe:
      case racingBoat:
      case jetSki:
      case paddleBoardSurfing:
      case groundWater:
      case diving:
      case paraGliderSurfing:
      case surfingAndWaterSkiing:
      case waterBalloon:
      case windsurfing:
      case drifting:
      case underwaterFitness:
      case waterSports:
      case freestyleSwimming:
      case breastStroke:
      case backstroke:
      case butterflyStroke:
      case openWaterSwimming:
      case swimming:
      //
      case jumpRope:
      case fitnessGaming:
      case groupTraining:
      case pilates:
      case mixedFitness:
      case functionalTraining:
      case physicalTraining:
      case hiking:
      case hiit:
      case rockClimbing:
      case bungeeJumping:
      case parkour:
      case bmxBike:
      case orienteering:
      case parachute:
      case racingCar:
      case takeElevator:
      case takeEscalator:
      case gardening:
      case doingHousehold:
      case inTheCar:
      case meditation:
      case static:
      case tilt:
      case wheelchairMobility:
      case generalExtremeSports:
      case battleGame:
      case flyAKite:
      case tugOfWar:
      case swing:
      case stairs:
      case obstacle:
      case scooter:
      case paraGlider:
      case teamSport:
      case fitnessVideoGames:
      case climbing:
      case equestrianSports:
      case play:
      case generalLeisureSports:
      case rollerSkating:
      case hulaHoop:
      case discSports:
      case darts:
      case singleBar:
      case parallelBars:
      case cyclicTraining:
      case callisthenics:
      case p90x:
      case kettleBellTraining:
      case stairClimbingMachine:
      case ballet:
      case handWheel:
      case mindBodyExercise:
      case softnessExercises:
      case crossTraining:
      // 室内运动
      case mixedAerobic:
      case strengthTraining:
      case coreTraining:
      case rowingMachine:
      case gymnastics:
      case yoga:
      case ladderTraining:
      case ellipticalTrainer:
      case treadmill:
      case spinning:
      case traditionStrengthTraining:
      case freeTraining:
      case generalExercise:
      case stepTraining:
      case other:
        return 'assets/images/home/exercise_type_other.png';
      default:
        return 'assets/images/home/exercise_type_all.png';
    }
  }

  static String getRealImg(Type type) {
    switch (type) {
      case outdoorRunning:
        return 'assets/images/sports/000_huwaipaobu.png';
      case indoorRunning:
        return 'assets/images/sports/003_shineipaobu.png';
      case indoorWalk:
        return 'assets/images/sports/002_shineizoulu.png';
      case outdoorWalk:
        return 'assets/images/sports/001_huwaizoulu.png';
      case airWalker:
        return 'assets/images/sports/020_manbuji.png';
      case walking:
        return 'assets/images/home/exercise_type_walk.png';
      case rideBike:
        return 'assets/images/sports/005_huwaiqixing.png';
      case indoorCycling:
        return 'assets/images/sports/006_shineidanche.png';
      case yogaCatStyle:
        return 'assets/images/sports/025_maoshi.png';
      case yogaCowStyle:
        return 'assets/images/sports/026_niushi.png';
      case yogaCobraPose:
        return 'assets/images/sports/027_yanjingshe.png';
      case yogaHero1:
        return 'assets/images/sports/028_yingxiongshi1.png';
      case yogaHero2:
        return 'assets/images/sports/029_yingxiongshi2.png';
      case yogaHero3:
        return 'assets/images/sports/030_yingxiongshi3.png';
      case aerobicTraining:
        return 'assets/images/sports/048_youyang.png';
      case barre:
        return 'assets/images/sports/055_barre.png';
      case squareDance:
        return 'assets/images/sports/072_guangchangwu.png';
      case zumbaDance:
        return 'assets/images/sports/073_zunba.png';
      case streetDance:
        return 'assets/images/sports/071_jiewu.png';
      case generalDance:
        return 'assets/images/sports/066_yibanwudao.png';
      case latinDance:
        return 'assets/images/sports/69_ladingwu.png';
      case folkDance:
        return '';
      case bellyDance:
        return 'assets/images/sports/067_dupiwu.png';
      case jazz:
        return 'assets/images/sports/068_jueshiwu.png';
      case socialDance:
        return 'assets/images/sports/074_shejiaowu.png';
      case tapDancing:
        return 'assets/images/sports/075_titawu.png';
      case dance:
        return 'assets/images/sports/013_wudao.png';
      case weightlifting:
        return 'assets/images/sports/054_juzhong.png';
      case trackAndField:
        return 'assets/images/sports/057_tianjing.png';
      case triathlon:
        return 'assets/images/sports/009_tierensanxaing.png';
      case fencing:
        return 'assets/images/sports/041_jijian.png';
      case boxing:
        return 'assets/images/sports/038_quanji.png';
      case taiChi:
        return 'assets/images/sports/079_taiji.png';
      case karate:
        return 'assets/images/sports/040_kongshoudao.png';
      case judo:
        return '';
      case wrestling:
        return 'assets/images/sports/058_jiaoli.png';
      case taekwondo:
        return 'assets/images/sports/037_taiquandao.png';
      case martialArts:
        return 'assets/images/sports/078_wushu.png';
      case kickboxing:
        return 'assets/images/sports/039_ziyouquanji.png';
      case boxingAerobics:
        return 'assets/images/sports/043_quanjiyouyang.png';
      case kendo:
        return 'assets/images/sports/044_jiandao.png';
      case mixedMartialArts:
        return 'assets/images/sports/052_zonghegedou.png';
      case generalBallGames:
        return 'assets/images/sports/100_yibanqiulei.png';
      case basketball:
        return 'assets/images/sports/101_lanqiu.png';
      case badminton:
        return 'assets/images/sports/102_yumaoqiu.png';
      case tennis:
        return 'assets/images/sports/104_wangqiu.png';
      case billiards:
        return 'assets/images/sports/105_zhuangqiu.png';
      case shuttlecock:
        return 'assets/images/sports/108_jianziqiu.png';
      case softball:
        return 'assets/images/sports/111_leiqiu.png';
      case rugby:
        return 'assets/images/sports/113_meishiganlanqiu.png';
      case beachFootball:
        return 'assets/images/sports/114_shatanzuqiu.png';
      case baseball:
        return 'assets/images/sports/110_bangqiu.png';
      case cricket:
        return 'assets/images/sports/112_banqiu.png';
      case beachVolleyball:
        return 'assets/images/sports/135_shatanpaiqiu.png';
      case racquetball:
        return 'assets/images/sports/116_yingshibiqu.png';
      case volleyball:
        return 'assets/images/sports/107_paiqiu.png';
      case hockey:
        return 'assets/images/sports/115_qugunqiu.png';
      case bowling:
        return 'assets/images/sports/106_baolingqiu.png';
      case tableTennis:
        return 'assets/images/sports/103_pingpangqiu.png';
      case handball:
        return 'assets/images/sports/109_shouqiu.png';
      case football:
        return 'assets/images/sports/119_zuqiu.png';
      case americanSquash:
        return 'assets/images/sports/122_meishibiqiu.png';
      case englishRugby:
        return 'assets/images/sports/123_yingshiganlanqiu.png';
      case jetFootball:
        return 'assets/images/sports/117_tengqiu.png';
      case gateBall:
        return 'assets/images/sports/124_menqiu.png';
      case dodgeBall:
        return 'assets/images/sports/118_duobiqiu.png';
      case pickleBall:
        return 'assets/images/sports/125_pikeqiu.png';
      case golfBall:
        return 'assets/images/sports/120_gaoerfu.png';
      case polo:
        return 'assets/images/sports/121_maqiu.png';
      case pocketStickBall:
        return 'assets/images/sports/126_daigunqiu.png';

      // 水上运动
      case generalWaterActivities:
        return 'assets/images/sports/127_yibanshuishangyundong.png';
      case surfing:
        return 'assets/images/sports/129_chonglang.png';
      case boating:
        return 'assets/images/sports/130_fanzhou.png';
      case dragonBoat:
        return 'assets/images/sports/131_longzhou.png';
      case canoe:
        return 'assets/images/sports/132_qingting.png';
      case racingBoat:
        return 'assets/images/sports/133_saiting.png';
      case jetSki:
        return 'assets/images/sports/134_shuishangmotuo.png';
      case paddleBoardSurfing:
        return 'assets/images/sports/136_lijiangchonglang.png';
      case groundWater:
        return 'assets/images/sports/137_qianshui.png';
      case diving:
        return 'assets/images/sports/138_tiaoshui.png';
      case paraGliderSurfing:
        return 'assets/images/sports/139_huaxiangsanchonglang.png';
      case surfingAndWaterSkiing:
        return 'assets/images/sports/140_chonglanghuashui.png';
      case waterBalloon:
        return 'assets/images/sports/141_shuiqiu.png';
      case windsurfing:
        return 'assets/images/sports/142_fengfanchonglang.png';
      case drifting:
        return 'assets/images/sports/143_piaoliuhuodong.png';
      case underwaterFitness:
        return 'assets/images/sports/144_shuizhongjianshen.png';
      case waterSports:
        return 'assets/images/sports/145_shuishangyundong.png';
      case freestyleSwimming:
        return 'assets/images/sports/146_ziyoushi.png';
      case breastStroke:
        return 'assets/images/sports/147_washi.png';
      case backstroke:
        return 'assets/images/sports/149_yangshi.png';
      case butterflyStroke:
        return 'assets/images/sports/148_dieshi.png';
      case openWaterSwimming:
        return 'assets/images/sports/008_kaifangshuiyu.png';
      case swimming:
        return 'assets/images/sports/007_yongchiyouyong.png';
      //
      case jumpRope:
        return 'assets/images/sports/032_tiaosheng.png';
      case fitnessGaming:
        return 'assets/images/sports/022_jianshen.png';
      case groupTraining:
        return 'assets/images/sports/023_tuanticao.png';
      case pilates:
        return 'assets/images/sports/033_pilatisi.png';
      case mixedFitness:
        return 'assets/images/sports/034_hunhejianshen.png';
      case functionalTraining:
        return 'assets/images/sports/035_gongnneg.png';
      case physicalTraining:
        return 'assets/images/sports/036_tineng.png';
      case climbing:
        return 'assets/images/sports/010_dengshan.png';
      case hiit:
        return 'assets/images/sports/021_hiit.png';
      case rockClimbing:
        return 'assets/images/sports/164_panyan.png';
      case bungeeJumping:
        return 'assets/images/sports/165_bengji.png';
      case parkour:
        return 'assets/images/sports/166_paoku.png';
      case bmxBike:
        return 'assets/images/sports/167_bmx.png';
      case orienteering:
        return 'assets/images/sports/168_dingxiangyueye.png';
      case parachute:
        return 'assets/images/sports/169_tiaosan.png';
      case racingCar:
        return 'assets/images/sports/170_saiche.png';
      case takeElevator:
        return 'assets/images/sports/171_chengdainti.png';
      case takeEscalator:
        return 'assets/images/sports/172_fushouti.png';
      case gardening:
        return 'assets/images/sports/173_yuanyi.png';
      case doingHousehold:
        return 'assets/images/sports/174_jiawu.png';
      case inTheCar:
        return 'assets/images/sports/175_zaicheli.png';
      case meditation:
        return 'assets/images/sports/176_mingxiang.png';
      case static:
        return 'assets/images/sports/177_jingzhi.png';
      case tilt:
        return 'assets/images/sports/178_qinxie.png';
      case wheelchairMobility:
        return 'assets/images/sports/179_lunyi.png';
      case generalExtremeSports:
        return 'assets/images/sports/162_yibanjixian.png';
      case battleGame:
        return 'assets/images/sports/085_duizhanyouxi.png';
      case flyAKite:
        return 'assets/images/sports/086_fangfengzheng.png';
      case tugOfWar:
        return 'assets/images/sports/087_bahe.png';
      case swing:
        return 'assets/images/sports/088_qiuqian.png';
      case stairs:
        return 'assets/images/sports/089_palouti.png';
      case obstacle:
        return 'assets/images/sports/090_zhangaisai.png';
      case scooter:
        return 'assets/images/sports/093_huabanche.png';
      case paraGlider:
        return 'assets/images/sports/094_huixiangsan.png';
      case teamSport:
        return 'assets/images/sports/095_tuanduijingji.png';
      case fitnessVideoGames:
        return 'assets/images/sports/096_jianshendianwan.png';
      case hiking:
        return 'assets/images/sports/097_jianxing.png';
      case equestrianSports:
        return 'assets/images/sports/098_mashu.png';
      case play:
        return 'assets/images/sports/099_wanle.png';
      case generalLeisureSports:
        return 'assets/images/sports/076_yibanxiuxian.png';
      case rollerSkating:
        return 'assets/images/sports/077_lunhua.png';
      case hulaHoop:
        return 'assets/images/sports/080_hulaquan.png';
      case discSports:
        return 'assets/images/sports/081_feipan.png';
      case darts:
        return 'assets/images/sports/082_feibiao.png';
      case singleBar:
        return 'assets/images/sports/045_dangang.png';
      case parallelBars:
        return 'assets/images/sports/046_shuanggang.png';
      case cyclicTraining:
        return 'assets/images/sports/047_xunhuan.png';
      case callisthenics:
        return 'assets/images/sports/049_jianmeicao.png';
      case p90x:
        return 'assets/images/sports/050_px90.png';
      case kettleBellTraining:
        return 'assets/images/sports/051_linghu.png';
      case stairClimbingMachine:
        return 'assets/images/sports/053_palouji.png';
      case ballet:
        return 'assets/images/sports/070_balei.png';
      case handWheel:
        return 'assets/images/sports/056_shoulun.png';
      case mindBodyExercise:
        return 'assets/images/sports/059_shenxinyundong.png';
      case softnessExercises:
        return 'assets/images/sports/060_rouruancao.png';
      case crossTraining:
        return 'assets/images/sports/063_jiaocha.png';
      // 室内运动
      case mixedAerobic:
        return 'assets/images/sports/061_hunheyouyang.png';
      case strengthTraining:
        return 'assets/images/sports/017_jilixunlian.png';
      case coreTraining:
        return 'assets/images/sports/042_hexinxunlian.png';
      case rowingMachine:
        return 'assets/images/sports/012_huahcuanji.png';
      case gymnastics:
        return 'assets/images/sports/064_ticao.png';
      case yoga:
        return 'assets/images/sports/024_yujia.png';
      case ladderTraining:
        return '';
      case ellipticalTrainer:
        return 'assets/images/sports/011_tuoyuanji.png';
      case treadmill:
        return 'assets/images/sports/004_paobuji.png';
      case spinning:
        return 'assets/images/sports/018_donggandanche.png';
      case traditionStrengthTraining:
        return 'assets/images/sports/062_chuantong.png';
      case freeTraining:
        return 'assets/images/sports/014_ziyouxunlian.png';
      case generalExercise:
        return 'assets/images/sports/015_yibanduanlian.png';
      case stepTraining:
        return 'assets/images/sports/019_tabuji.png';
      case trailRunning:
        return 'assets/images/sports/016_yueyepao.png';
      case yogaRoller:
        return 'assets/images/sports/031_gunlun.png';
      case archery:
        return 'assets/images/sports/083_shejian.png';
      case horseRiding:
        return 'assets/images/sports/084_qima.png';
      case fishing:
        return 'assets/images/sports/091_diaoyu.png';
      case hunting:
        return 'assets/images/sports/092_dalie.png';
      case skating:
        return 'assets/images/sports/151_liubing.png';
      case iceHockey:
        return 'assets/images/sports/152_bingqiu.png';
      case curling:
        return 'assets/images/sports/153_binghu.png';
      case generalIceSports:
        return 'assets/images/sports/150_yibanbingshangyundong.png';
      case snowSar:
        return 'assets/images/sports/154_xueshangmotuo.png';
      case sled:
        return 'assets/images/sports/155_xueqiao.png';
      case biathlon:
        return 'assets/images/sports/156_dongjiliangxiang.png';
      case crossCountrySkiing:
        return 'assets/images/sports/158_yueyehuaxue.png';
      case snowboarding:
        return 'assets/images/sports/159_danbanhuaxue.png';
      case snowshoeHiking:
        return 'assets/images/sports/160_xuexiejianxing.png';
      case snowSports:
        return 'assets/images/sports/161_xuedi.png';
      case skiing:
        return 'assets/images/sports/157_huaxue.png';
      case skateboarding:
        return 'assets/images/sports/163_huaban.png';
      default:
        // return 'assets/images/home/exercise_type_all.png';
        return '';
    }
  }

  static String getClassifyImgBy(int type) {
    Type t = Type.values.firstWhere((element) => element.code == type);
    return getClassifyImg(t);
  }

  String internalI18nName(Type type) {
    return i18nName(type);
  }

  static String realImgBy(int type) {
    Type t = Type.values.firstWhere((element) => element.code == type);
    return getRealImg(t);
  }

  String realImg(Type type) {
    return getRealImg(type);
  }

  static String i18nName(Type type) {
    switch (type) {
      // 球类运动
      case generalBallGames:
        return LocaleKeys.sports_type_general_ball_games.ts;
      case basketball:
        return LocaleKeys.sports_type_basketball.ts;
      case badminton:
        return LocaleKeys.sports_type_badminton.ts;
      case tennis:
        return LocaleKeys.sports_type_tennis.ts;
      case billiards:
        return LocaleKeys.sports_type_billiards.ts;
      case shuttlecock:
        return LocaleKeys.sports_type_shuttlecock.ts;
      case softball:
        return LocaleKeys.sports_type_softball.ts;
      case rugby:
        return LocaleKeys.sports_type_rugby.ts;
      case beachFootball:
        return LocaleKeys.sports_type_beach_football.ts;
      case baseball:
        return LocaleKeys.sports_type_baseball.ts;
      case cricket:
        return LocaleKeys.sports_type_cricket.ts;
      case beachVolleyball:
        return LocaleKeys.sports_type_beach_volleyball.ts;
      case racquetball:
        return LocaleKeys.sports_type_racquetball.ts;
      case volleyball:
        return LocaleKeys.sports_type_volleyball.ts;
      case hockey:
        return LocaleKeys.sports_type_hockey.ts;
      case bowling:
        return LocaleKeys.sports_type_bowling.ts;
      case tableTennis:
        return LocaleKeys.sports_type_table_tennis.ts;
      case handball:
        return LocaleKeys.sports_type_handball.ts;
      case football:
        return LocaleKeys.sports_type_football.ts;
      case americanSquash:
        return LocaleKeys.sports_type_american_squash.ts;
      case englishRugby:
        return LocaleKeys.sports_type_english_rugby.ts;
      case jetFootball:
        return LocaleKeys.sports_type_jet_football.ts;
      case gateBall:
        return LocaleKeys.sports_type_gate_ball.ts;
      case dodgeBall:
        return LocaleKeys.sports_type_dodge_ball.ts;
      case pickleBall:
        return LocaleKeys.sports_type_pickle_ball.ts;
      case golfBall:
        return LocaleKeys.sports_type_golf_ball.ts;
      case polo:
        return LocaleKeys.sports_type_polo.ts;
      case pocketStickBall:
        return LocaleKeys.sports_type_pocket_stick_ball.ts;

      //室内运动
      case mixedAerobic:
        return LocaleKeys.sports_type_free_mixed_aerobic.ts;
      case strengthTraining:
        return LocaleKeys.sports_type_strength_training.ts;
      case coreTraining:
        return LocaleKeys.sports_type_core_training.ts;
      case rowingMachine:
        return LocaleKeys.sports_type_rowing_machine.ts;
      case gymnastics:
        return LocaleKeys.sports_type_gymnastics.ts;
      case yoga:
        return LocaleKeys.sports_type_yoga.ts;
      case ladderTraining:
        return LocaleKeys.sports_type_ladder_training.ts;
      case ellipticalTrainer:
        return LocaleKeys.sports_type_elliptical_trainer.ts;
      case treadmill:
        return LocaleKeys.sports_type_treadmill.ts;
      case spinning:
        return LocaleKeys.sports_type_spinning.ts;
      case indoorWalk:
        return LocaleKeys.sports_type_indoor_walk.ts;
      case traditionStrengthTraining:
        return LocaleKeys.sports_type_tradition_strength_training.ts;
      case freeTraining:
        return LocaleKeys.sports_type_free_training.ts;
      case generalExercise:
        return LocaleKeys.sports_type_general_exercise.ts;
      case stepTraining:
        return LocaleKeys.sports_type_step_training.ts;
      case airWalker:
        return LocaleKeys.sports_type_air_walker.ts;
      case yogaCatStyle:
        return LocaleKeys.sports_type_yoga_cat_style.ts;
      case yogaCowStyle:
        return LocaleKeys.sports_type_yoga_cow_style.ts;
      case yogaCobraPose:
        return LocaleKeys.sports_type_yoga_cobra_pose.ts;
      case yogaHero1:
        return LocaleKeys.sports_type_yoga_hero1.ts;
      case yogaHero2:
        return LocaleKeys.sports_type_yoga_hero2.ts;
      case yogaHero3:
        return LocaleKeys.sports_type_yoga_hero3.ts;
      case yogaRoller:
        return LocaleKeys.sports_type_yoga_roller.ts;

      // 体育舞蹈
      case barre:
        return LocaleKeys.sports_type_barre.ts;
      case squareDance:
        return LocaleKeys.sports_type_square_dance.ts;
      case zumbaDance:
        return LocaleKeys.sports_type_zumba_dance.ts;
      case streetDance:
        return LocaleKeys.sports_type_street_dance.ts;
      case generalDance:
        return LocaleKeys.sports_type_general_dance.ts;
      case latinDance:
        return LocaleKeys.sports_type_latin_dance.ts;
      case folkDance:
        return LocaleKeys.sports_type_fork_dancing.ts;
      case bellyDance:
        return LocaleKeys.sports_type_belly_dance.ts;
      case jazz:
        return LocaleKeys.sports_type_jazz.ts;
      case socialDance:
        return LocaleKeys.sports_type_social_dance.ts;
      case tapDancing:
        return LocaleKeys.sports_type_tap_dancing.ts;
      case dance:
        return LocaleKeys.sports_type_dance.ts;
      case weightlifting:
        return LocaleKeys.sports_type_weightlifting.ts;
      case triathlon:
        return LocaleKeys.sports_type_triathlon.ts;
      case trackAndField:
        return LocaleKeys.sports_type_track_and_field.ts;

      // 冰雪运动
      case skiing:
        return LocaleKeys.sports_type_skiing.ts;
      case curling:
        return LocaleKeys.sports_type_curling.ts;
      case generalIceSports:
        return LocaleKeys.sports_type_general_ice_sports.ts;
      case skating:
        return LocaleKeys.sports_type_skating.ts;
      case snowSar:
        return LocaleKeys.sports_type_snowSar.ts;
      case sled:
        return LocaleKeys.sports_type_sled.ts;
      case biathlon:
        return LocaleKeys.sports_type_biathlon.ts;
      case crossCountrySkiing:
        return LocaleKeys.sports_type_cross_country_skiing.ts;
      case snowboarding:
        return LocaleKeys.sports_type_snowboarding.ts;
      case snowshoeHiking:
        return LocaleKeys.sports_type_snowshoe_hiking.ts;
      case snowSports:
        return LocaleKeys.sports_type_snow_sports.ts;
      case iceHockey:
        return LocaleKeys.sports_type_ice_hockey.ts;

      // 专项运动
      case archery:
        return LocaleKeys.sports_type_archery.ts;
      case fishing:
        return LocaleKeys.sports_type_fishing.ts;
      case skateboarding:
        return LocaleKeys.sports_type_skateboarding.ts;
      case hunting:
        return LocaleKeys.sports_type_hunting.ts;
      case horseRiding:
        return LocaleKeys.sports_type_horse_riding.ts;
      case sailboat:
        return LocaleKeys.sports_type_sailboat.ts;
      case blading:
        return LocaleKeys.sports_type_blading.ts;
      case aerobicTraining:
        return LocaleKeys.sports_type_aerobic_training.ts;

      // 格斗运动
      case fencing:
        return LocaleKeys.sports_type_fencing.ts;
      case boxing:
        return LocaleKeys.sports_type_boxing.ts;
      case taiChi:
        return LocaleKeys.sports_type_taichi.ts;
      case karate:
        return LocaleKeys.sports_type_karate.ts;
      case judo:
        return LocaleKeys.sports_type_judo.ts;
      case wrestling:
        return LocaleKeys.sports_type_wrestling.ts;
      case taekwondo:
        return LocaleKeys.sports_type_taekwondo.ts;
      case martialArts:
        return LocaleKeys.sports_type_martial_arts.ts;
      case kickboxing:
        return LocaleKeys.sports_type_kickboxing.ts;
      case boxingAerobics:
        return LocaleKeys.sports_type_boxing_aerobics.ts;
      case kendo:
        return LocaleKeys.sports_type_kendo.ts;
      case mixedMartialArts:
        return LocaleKeys.sports_type_mixed_martial_arts.ts;

      // 其他运动类型
      case hiit:
        return LocaleKeys.sports_type_hiit.ts;
      case jumpRope:
        return LocaleKeys.sports_type_jump_rope.ts;
      case groupTraining:
        return LocaleKeys.sports_type_group_training.ts;
      case functionalTraining:
        return LocaleKeys.sports_type_functional_trainings.ts;
      case fitnessGaming:
        return LocaleKeys.sports_type_fitness_gaming.ts;
      case pilates:
        return LocaleKeys.sports_type_pilates.ts;
      case mixedFitness:
        return LocaleKeys.sports_type_mixed_fitness.ts;
      case physicalTraining:
        return LocaleKeys.sports_type_physical_training.ts;
      case climbing:
        return LocaleKeys.sports_type_climbing.ts;
      case rockClimbing:
        return LocaleKeys.sports_type_rock_climbing.ts;
      case bungeeJumping:
        return LocaleKeys.sports_type_bungee_jumping.ts;
      case parkour:
        return LocaleKeys.sports_type_parkour.ts;
      case bmxBike:
        return LocaleKeys.sports_type_bmxBike.ts;
      case orienteering:
        return LocaleKeys.sports_type_orienteering.ts;
      case parachute:
        return LocaleKeys.sports_type_parachute.ts;
      case racingCar:
        return LocaleKeys.sports_type_racing_car.ts;
      case takeElevator:
        return LocaleKeys.sports_type_take_elevator.ts;
      case takeEscalator:
        return LocaleKeys.sports_type_take_escalator.ts;
      case gardening:
        return LocaleKeys.sports_type_gardening.ts;
      case doingHousehold:
        return LocaleKeys.sports_type_doing_household.ts;
      case inTheCar:
        return LocaleKeys.sports_type_in_the_car.ts;
      case meditation:
        return LocaleKeys.sports_type_meditation.ts;
      case static:
        return LocaleKeys.sports_type_static.ts;
      case tilt:
        return LocaleKeys.sports_type_tilt.ts;
      case wheelchairMobility:
        return LocaleKeys.sports_type_wheelchair_mobility.ts;
      case generalExtremeSports:
        return LocaleKeys.sports_type_general_extreme_sports.ts;
      case battleGame:
        return LocaleKeys.sports_type_battle_game.ts;
      case flyAKite:
        return LocaleKeys.sports_type_flyAKite.ts;
      case tugOfWar:
        return LocaleKeys.sports_type_tug_of_war.ts;
      case swing:
        return LocaleKeys.sports_type_swing.ts;
      case stairs:
        return LocaleKeys.sports_type_stairs.ts;
      case obstacle:
        return LocaleKeys.sports_type_obstacle.ts;
      case scooter:
        return LocaleKeys.sports_type_scooter.ts;
      case paraGlider:
        return LocaleKeys.sports_type_para_glider.ts;
      case teamSport:
        return LocaleKeys.sports_type_team_sport.ts;
      case fitnessVideoGames:
        return LocaleKeys.sports_type_fitness_video_games.ts;
      case hiking:
        return LocaleKeys.sports_type_hiking.ts;
      case equestrianSports:
        return LocaleKeys.sports_type_equestrian_sports.ts;
      case play:
        return LocaleKeys.sports_type_play.ts;
      case generalLeisureSports:
        return LocaleKeys.sports_type_general_leisure_sports.ts;
      case rollerSkating:
        return LocaleKeys.sports_type_roller_skating.ts;
      case hulaHoop:
        return LocaleKeys.sports_type_hula_hoop.ts;
      case discSports:
        return LocaleKeys.sports_type_disc_sports.ts;
      case darts:
        return LocaleKeys.sports_type_darts.ts;
      case singleBar:
        return LocaleKeys.sports_type_single_bar.ts;
      case parallelBars:
        return LocaleKeys.sports_type_parallel_bars.ts;
      case cyclicTraining:
        return LocaleKeys.sports_type_cyclic_training.ts;
      case callisthenics:
        return LocaleKeys.sports_type_callisthenics.ts;
      case p90x:
        return LocaleKeys.sports_type_p90x.ts;
      case kettleBellTraining:
        return LocaleKeys.sports_type_kettle_bell_training.ts;
      case stairClimbingMachine:
        return LocaleKeys.sports_type_stair_climbing_machine.ts;
      case ballet:
        return LocaleKeys.sports_type_ballet.ts;
      case handWheel:
        return LocaleKeys.sports_type_hand_wheel.ts;
      case mindBodyExercise:
        return LocaleKeys.sports_type_mind_body_exercise.ts;
      case softnessExercises:
        return LocaleKeys.sports_type_softness_exercises.ts;
      case crossTraining:
        return LocaleKeys.sports_type_cross_training.ts;

      // 水上运动
      case generalWaterActivities:
        return LocaleKeys.sports_type_general_water_activities.ts;
      case surfing:
        return LocaleKeys.sports_type_surfing.ts;
      case boating:
        return LocaleKeys.sports_type_boating.ts;
      case dragonBoat:
        return LocaleKeys.sports_type_dragon_boat.ts;
      case canoe:
        return LocaleKeys.sports_type_canoe.ts;
      case racingBoat:
        return LocaleKeys.sports_type_racing_boat.ts;
      case jetSki:
        return LocaleKeys.sports_type_jet_ski.ts;
      case paddleBoardSurfing:
        return LocaleKeys.sports_type_paddle_board_surfing.ts;
      case groundWater:
        return LocaleKeys.sports_type_ground_water.ts;
      case diving:
        return LocaleKeys.sports_type_diving.ts;
      case paraGliderSurfing:
        return LocaleKeys.sports_type_para_glider_surfing.ts;
      case surfingAndWaterSkiing:
        return LocaleKeys.sports_type_surfing_and_water_skiing.ts;
      case waterBalloon:
        return LocaleKeys.sports_type_water_balloon.ts;
      case windsurfing:
        return LocaleKeys.sports_type_windsurfing.ts;
      case drifting:
        return LocaleKeys.sports_type_drifting.ts;
      case underwaterFitness:
        return LocaleKeys.sports_type_underwater_fitness.ts;
      case waterSports:
        return LocaleKeys.sports_type_water_sorts.ts;
      case freestyleSwimming:
        return LocaleKeys.sports_type_freestyle_swimming.ts;
      case breastStroke:
        return LocaleKeys.sports_type_breast_stroke.ts;
      case backstroke:
        return LocaleKeys.sports_type_backstroke.ts;
      case butterflyStroke:
        return LocaleKeys.sports_type_butterfly_stroke.ts;
      case openWaterSwimming:
        return LocaleKeys.sports_type_open_water_swimming.ts;
      case swimming:
        return LocaleKeys.sports_type_swimming.ts;

      // 跑步类
      case outdoorRunning:
        return LocaleKeys.sports_type_outdoor_running.ts;
      case indoorRunning:
        return LocaleKeys.sports_type_indoor_running.ts;
      case trailRunning:
        return LocaleKeys.sports_type_trail_running.ts;
      case enduranceRun:
        return LocaleKeys.sports_type_endurance_run.ts;
      case fatBurnRun:
        return LocaleKeys.sports_type_fat_burn_run.ts;

      case walking:
        return LocaleKeys.sports_type_walking.ts;
      case outdoorWalk:
        return LocaleKeys.sports_type_outdoor_walk.ts;

      // 骑行类
      case indoorCycling:
        return LocaleKeys.sports_type_indoor_cycling.ts;
      case rideBike:
        return LocaleKeys.sports_type_outdoor_riding.ts;

      case other:
        return LocaleKeys.exercise_type_other.ts;
      default:
        return LocaleKeys.sports_type_all.ts;
    }
  }

  static String i18nNameBy(int type) {
    Type t = Type.values.firstWhere((element) => element.code == type);
    return i18nName(t);
  }

  static List<int> getTypes(Type type) {
    switch (type) {
      case outdoorRunning:
        return [outdoorRunning.code];
      case indoorRunning:
        return [indoorRunning.code];
      case walking:
        return Type.values.where((t) => t.classify == walking.classify).map((e) => e.code).toList();
      case rideBike:
        return Type.values.where((t) => t.classify == rideBike.classify).map((e) => e.code).toList();
      case other:
        return Type.values.where((t) => t.classify == other.classify).map((e) => e.code).toList();
      default:
        return Type.values.map((e) => e.code).toList();
    }
  }

  static bool isOtherType(int type) {
    return Type.values.where((e) => e.classify == Type.other.classify).map((e) => e.code).toList().contains(type);
  }

  /// 判断是否是需要显示运动轨迹的运动类型
  static bool isMotionTrail(int type) {
    List<int> sports = [Type.outdoorRunning.code, Type.rideBike.code, Type.outdoorWalk.code];
    return sports.contains(type);
  }

  /// 判断是否是户外骑行运动类型
  static bool isOutdoorCycling(int type) {
    return Type.rideBike.code == type;
  }

  /// 判断是否显示步幅、步频的运动类型
  static bool isStepSports(int type) {
    List<int> sports = [Type.outdoorRunning.code, Type.indoorWalk.code, Type.indoorRunning.code, Type.treadmill.code, Type.outdoorWalk.code];
    return sports.contains(type);
  }

  /// 判断是否是有距离的运动
  static bool hasDistanceSports(int type) {
    List<int> sports = [Type.indoorWalk.code, Type.indoorRunning.code, Type.treadmill.code];
    return isMotionTrail(type) || sports.contains(type);
  }

  /// 根据分类和设备支持的运动类型获取可以展示的"Type"列表
  static List<Type> getCodeListBy(String classify, List deviceSupportList) {
    List<Type> types = Type.values.where((element) => element.classify == classify).toList();
    List<Type> result = types.where((element) => deviceSupportList.contains(element.code)).toList();
    logger2.d('classify : $classify, length : ${result.length}');
    return result;
  }

  static Type getType(int type) {
    return Type.values.firstWhere((element) => element.code == type, orElse: () => Type.other);
  }
}
